package cn.hospital.controller;

import cn.hospital.entity.Anemia;
import cn.hospital.entity.AnnotationFields;
import cn.hospital.entity.BloodTransfusionRecord;
import cn.hospital.service.QueryFieldAnnotationsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/QueryFieldAnnotations")
public class QueryFieldAnnotationsController {

    @Autowired
    private QueryFieldAnnotationsService queryFieldAnnotationsService;

    /**
     * 查询病人字段和注释
     */
    @RequestMapping("/selectPtientInformationSheet")
    @ResponseBody
    public Map<String, Object> selectPtientInformationSheet() {
        Map<String, Object> map = new HashMap<>();
        /**
         * 查询病人表的字段和注释
         */
        List<AnnotationFields> patient = queryFieldAnnotationsService.selectPatientInformationSheet();
        map.put("patient", patient);

        /**
         * 查询病人家属表的字段
         */
        List<AnnotationFields> patientsFamily = queryFieldAnnotationsService.selectPatientsFamily();
        map.put("patientsFamily", patientsFamily);

        /**
         * 查询门诊的字段
         */
        List<AnnotationFields> diagnosis = queryFieldAnnotationsService.selectDiagnosis();
        map.put("diagnosis", diagnosis);

        /**
         * 查询证件的字段
         */
        List<AnnotationFields> certificate = queryFieldAnnotationsService.selectCertificate();
        map.put("certificate", certificate);

        /**
         * 查询手术字段
         */
        List<AnnotationFields> operationInformationSheet = queryFieldAnnotationsService.selectOperationInformationSheet();
        map.put("operationInformationSheet", operationInformationSheet);

        /**
         * 查询麻醉信息的字段
         */
        List<AnnotationFields> anesthesiaInformation = queryFieldAnnotationsService.selectAnesthesiaInformation();
        map.put("anesthesiaInformation", anesthesiaInformation);

        /**
         * 查询就诊费用字段
         */
        List<AnnotationFields> charge = queryFieldAnnotationsService.selectCharge();
        map.put("charge", charge);

        /**
         * 查询病理（检验）报告字段
         */
        List<AnnotationFields> pathologicalReport = queryFieldAnnotationsService.selectPathologicalReport();
        map.put("pathologicalReport", pathologicalReport);

        /**
         * 健康状态-输血信息
         */
        List<BloodTransfusionRecord> bloodTransfusionRecord = queryFieldAnnotationsService.selectBloodTransfusionRecord();
        map.put("bloodTransfusionRecord", bloodTransfusionRecord);

        /**
         * 临床检验-检验结果（体格检查）
         */
        List<Anemia> anemia = queryFieldAnnotationsService.selectAnemia();
        map.put("anemia", anemia);

        /**
         * 临床诊断字段
         */
        List<AnnotationFields> diagnosticInformationSheet = queryFieldAnnotationsService.selectDiagnosticInformationSheet();
        map.put("diagnosticInformationSheet", diagnosticInformationSheet);

        /**
         * 评分表字段
         */
        List<AnnotationFields> score = queryFieldAnnotationsService.selectScore();
        map.put("score", score);

        /**
         * 随访组字段
         */
        List<AnnotationFields> grouptable = queryFieldAnnotationsService.selectGrouptable();
        map.put("grouptable", grouptable);

        /**
         * 骨转移字段和注释
         */
        List<AnnotationFields> boneMetastases = queryFieldAnnotationsService.selectBoneMetastases();
        map.put("boneMetastases", boneMetastases);

        /**
         * 脑转移字段和注释
         */
        List<AnnotationFields> brainMetastases = queryFieldAnnotationsService.selectBrainMetastases();
        map.put("brainMetastases", brainMetastases);

        /**
         * 化学物质接触式字段和注释
         */
        List<AnnotationFields> chemicalExposureHistory = queryFieldAnnotationsService.selectChemicalExposureHistory();
        map.put("chemicalExposureHistory", chemicalExposureHistory);

        /**
         * 胸部影像学字段和注释
         */
        List<AnnotationFields> chestImaging = queryFieldAnnotationsService.selectChestImaging();
        map.put("chestImaging", chestImaging);

        /**
         * 病种表字段和注释
         */
        List<AnnotationFields> drg = queryFieldAnnotationsService.selectDrg();
        map.put("drg", drg);

        /**
         * 家族史字段和注释
         */
        List<AnnotationFields> familyHistoryOfCancer = queryFieldAnnotationsService.selectFamilyHistoryOfCancer();
        map.put("familyHistoryOfCancer", familyHistoryOfCancer);

        /**
         * 随访信息字段和注释
         */
        List<AnnotationFields> followInformation = queryFieldAnnotationsService.selectFollowInformation();
        map.put("followInformation", followInformation);

        /**
         * 随访记录字段和注释
         */
        List<AnnotationFields> followUpRecords = queryFieldAnnotationsService.selectFollowUpRecords();
        map.put("followUpRecords", followUpRecords);

        /**
         * 病史字段和注释
         */
        List<AnnotationFields> historyOfPathology = queryFieldAnnotationsService.selectHistoryOfPathology();
        map.put("historyOfPathology", historyOfPathology);

        /**
         * 精神创伤史字段和注释
         */
        List<AnnotationFields> historyOfTrauma = queryFieldAnnotationsService.selectHistoryOfTrauma();
        map.put("historyOfTrauma", historyOfTrauma);

        /**
         * 肝转移字段和注释
         */
        List<AnnotationFields> liverMetastasis = queryFieldAnnotationsService.selectLiverMetastasis();
        map.put("liverMetastasis", liverMetastasis);

        /**
         * 淋巴结转移字段和注释
         */
        List<AnnotationFields> lymphNodeMetastasis = queryFieldAnnotationsService.selectLymphNodeMetastasis();
        map.put("lymphNodeMetastasis", lymphNodeMetastasis);

        /**
         * 治疗史字段和注释
         */
        List<AnnotationFields> medicalHistory = queryFieldAnnotationsService.selectMedicalHistory();
        map.put("medicalHistory", medicalHistory);

        /**
         * 肺部疾病史字段和注释
         */
        List<AnnotationFields> tumorDiseaseHistory = queryFieldAnnotationsService.selectTumorDiseaseHistory();
        map.put("tumorDiseaseHistory", tumorDiseaseHistory);

        /**
         * 用药信息字段和注释
         */
        List<AnnotationFields> medicalInformation = queryFieldAnnotationsService.selectMedicalInformation();
        map.put("medicalInformation", medicalInformation);

        /**
         * 其他转移字段和注释
         */
        List<AnnotationFields> otherTransfer = queryFieldAnnotationsService.selectOtherTransfer();
        map.put("otherTransfer", otherTransfer);

        /**
         * 病理学字段和注释
         */
        List<AnnotationFields> pathology = queryFieldAnnotationsService.selectPathology();
        map.put("pathology", pathology);

        /**
         * 肺转移字段和注释
         */
        List<AnnotationFields> pulmonaryMetastasis = queryFieldAnnotationsService.selectPulmonaryMetastasis();
        map.put("pulmonaryMetastasis", pulmonaryMetastasis);


        /**
         * 数据复审字段和注释
         */
        List<AnnotationFields> reexamine = queryFieldAnnotationsService.selectReexamine();
        map.put("reexamine", reexamine);


        /**
         * 进度字段和注释
         */
        List<AnnotationFields> scheduleTable = queryFieldAnnotationsService.selectScheduleTable();
        map.put("scheduleTable", scheduleTable);


        /**
         * 体征血字段和注释
         */
        List<AnnotationFields> signsOfBlood = queryFieldAnnotationsService.selectSignsOfBlood();
        map.put("signsOfBlood", signsOfBlood);

        /**
         * 吸烟史字段和注释
         */
        List<AnnotationFields> smokingHistory = queryFieldAnnotationsService.selectSmokingHistory();
        map.put("smokingHistory", smokingHistory);

        /**
         * 与病情相关症状字段和注释
         */
        List<AnnotationFields> symptomsAssociatedWithIllness = queryFieldAnnotationsService.selectSymptomsAssociatedWithIllness();
        map.put("symptomsAssociatedWithIllness", symptomsAssociatedWithIllness);

        /**
         * 与治疗相关症状字段和注释
         */
        List<AnnotationFields> symptomsAssociatedWithTreatment = queryFieldAnnotationsService.selectSymptomsAssociatedWithTreatment();
        map.put("symptomsAssociatedWithTreatment", symptomsAssociatedWithTreatment);

        /**
         * 肿瘤标志物字段和注释
         */
        List<AnnotationFields> tumorMarker = queryFieldAnnotationsService.selectTumorMarker();
        map.put("tumorMarker", tumorMarker);

        return map;
    }
}
